        <script type="text/javascript">
            $(document).ready(function() {
                var parentDiv = $('#<?=$this->getLabel()?>Div').parent();
                var width= parentDiv.attr('offsetWidth');
                var colors = parentDiv.css('background-color').match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
                var maxcolor = colors[1];
                if (maxcolor<colors[2])
                    maxcolor = colors[2];
                if (maxcolor<colors[3])
                    maxcolor = colors[3];

                if (maxcolor>=128) {
                    colors[1]=parseInt(colors[1]/1.5);
                    colors[2]=parseInt(colors[2]/1.5);
                    colors[3]=parseInt(colors[3]/1.5);
                } else {
                    colors[1]=parseInt(colors[1]*1.5+64);
                    colors[2]=parseInt(colors[2]*1.5+64);
                    colors[3]=parseInt(colors[3]*1.5+64);
                }
                var finalcolors = 'rgb(' + colors[1] + ',' + colors[2] + ',' + colors[3] + ')';

                $('#<?=$this->getLabel()?>Div').css('background-color',finalcolors);

                $('#<?=$this->getLabel()?>_img').attr('width',width-20);

            $.ajaxSetup({async: false});
            $.getScript('/js/jquery/jquery.corner.js',function(){
$('.myCorner').corner("tear 20px").parent().css('padding', '15px').corner("tear 20px");

            });
            $.ajaxSetup({async: true});


            });
        </script>

<div id="<?=$this->getLabel()?>Div" class="myCorner" style="padding:10px"><img id="<?=$this->getLabel()?>_img" src="<?=$this->getFile()?>"/></div>

